// IVB checksum: 3439609699
/*-----------------------------------------------------------------
File name     : reg_test.e
Developers    : filip, stefan
Created       : Aug  15 12:54:04 2011
Description   :
Notes         :
-------------------------------------------------------------------
Copyright 2011 (c) 
-----------------------------------------------------------------*/
<'
package vv_testbus;

import vr_ad/e/vr_ad_top;
import vv_testbus/examples/vv_ahblite_config;
import vv_testbus/examples/vr_ad/vv_ahblite_ad_config;

extend vr_ad_sequence_kind : [ACCESS_REG];

extend ACCESS_REG vr_ad_sequence {
    
    !ctrl_reg   : EX_CTRL_REG vr_ad_reg;
    !status_reg : EX_STATUS_REG vr_ad_reg;
    
    body() @driver.clock is {
        
        -- Wait for random number of cycle 
        wait [5]*cycle @driver.default_bfm_sd.clock;
        
        write_reg ctrl_reg {.ctrl1 == 1};
        write_reg status_reg {.status1 == 2};
        
        read_reg ctrl_reg;
        read_reg status_reg;
        
    };
};

extend MAIN vr_ad_sequence {
    
    !access_reg : ACCESS_REG vr_ad_sequence;
    
    keep prevent_test_done;
    
    body() @driver.clock is only {
        do access_reg;
    };
};

extend MAIN vv_ahblite_master_sequence {

    body() @driver.clock is only {
    };
}; 
'>
